$(function(){
	$(".header_nav").load("header_top.html");
	var recharge_obj = JSON.parse(localStorage.recharge_json);
	$(".recharge_money").text(recharge_obj.order_val[recharge_obj.order_val.length-1]);
	$(".order_num").text(recharge_obj.order_num[recharge_obj.order_val.length-1]);
	//<---------------支付方式的点击事件----------------->
	$(".pay_type_select").click(function(){
		$(".pay_type_select").attr("src","img/rechange_pay/unselect.png");
		$(this).attr("src","img/rechange_pay/select.png");
	})
	//<---------------立即支付按钮的点击事件--------------->
	var timer;
	var time_to_jump = parseInt($(".time_to_jump").text());
	$(".pay_now").click(function(){
		setTimeout(function(){
			$(".recharge_success").css("display","block");
			timer = setInterval(function(){
				time_to_jump --;
				if (time_to_jump < 0) {
					clearInterval(timer);
					$(".recharge_success").css("display","none");
					//接下来需要跳转界面,先预留着
					window.location = "my_yihe_ticket.html"
				}
				$(".time_to_jump").text(time_to_jump);
			},1000);
		},2000)
	})
})